home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 June
/
1984-06.d64
/
word scramble_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
75 lines
1 poke53280,6:poke53281,1
5 sn=54272
6 pokesn+24,15:pokesn+5,17:pokesn+6,240:pokesn,100
10 print"[147]":print"word scramble"
20 gosub1000:print"[147]"
25 print"each player takes a turn entering a common ";
30 print"word (a maximum of 10 letters)."
35 print"the computer will then scramble the word";
40 print"and print it."
45 print"you have three minutes to find it."
50 print"if found within the allotted time, you"
55 print"will be given 50 points."
60 print"for every wrong guess that you make, youwill lose 10 points."
65 print"[156]press space bar when ready[146]"
70 ifpeek(197)<>60then70
75 poke198,0
80 print"[147]player # 1's name":inputp$(0)
85 print"[156]player # 2's name":inputp$(1)
90 print"";p$(c);" enter word to be scrambled:[146]"
92 w$="":inputw$:ifw$=""thenprint"[145]";:goto92
95 iflen(w$)>10thenprint"no more then 10 letters[146]":goto90
100 gosub200
110 gosub300
120 t(c)=t(c)+s(c)
130 gosub400:fori=1to10:b$(i)="":next
140 goto90
200 fori=1tolen(w$)
210 a$(i)=mid$(w$,i,1)
220 next
230 c$="":fori=1tolen(w$)
240 r=int(rnd(1)*len(w$)+1)
250 ifb$(r)<>""then240
260 b$(r)=a$(i)
270 next
271 fori=1tolen(w$):c$=c$+b$(i):next
272 ifc$=w$andlen(w$)<>1thenfori=1tolen(w$):b$(i)="":next:goto230
275 print"[147] word has been scrambled.[146]"
280 poke 198,0:print" press space bar when ready"
285 ifpeek(197)<>60then285
290 print"[147]";
295 fori=1tolen(w$):print"";b$(i);:next
298 poke198,0:return
300 x=95:s(c)=50
310 ti$="000000"
320 print:print:print:print
325 sc=1399:cc=sc+54272
330 fori=1tolen(w$)
335 pokesc,99:pokecc,2
340 getc$
350 print""mid$(ti$,4,1)" [146]minutes "right$(ti$,2)" [146]seconds"
355 ifti$="000300"thengosub500:goto390
360 ifc$=""then340
365 print""
370 ifc$=a$(i)thenprinttab(x)a$(i);:by=50:ln=50:gosub600:goto380
375 ifs(c)<10thengosub550:goto390
378 ifc$<>a$(i)thens(c)=s(c)-10:by=20:ln=120:gosub600:goto335
380 x=x+1:sc=sc+1:cc=cc+1:next
390 return
400 ifc<>1thenc=1:return
410 print"[147]scores[146]"
420 print"[163][163][163][163][163][163]"
430 print""p$(0);tab(25);p$(1)
440 print""t(1);tab(24);t(0)
450 c=0:return
500 print"[147]your time is up[146]"
510 print"word was "w$".":s(c)=0
520 fort=1to5000:next:return
550 print"you ran out of points[146]"
560 print"[156]word was "w$"."
570 fort=1to2000:next
580 return
600 pokesn+1,by:pokesn+4,33:forqq=1toln:next:pokesn+4,32:return
1000 forby=50to20step-1:ln=20:gosub600:next:fori=1to500:next
1010 return